<% content_for :title do %><%=@product.name %> <% end %>


<div class="product_show">

  <% if @product.image.exists?  %>
    <div class="image">
      <%=product_image @product, :normal %>
    </div>
  <% end %>

  <div class="buy">
    <div class="price"><%=format_price @product.price %></div>
    <%=link_to image_tag('basket_add.gif') + ' Winkelwagentje', cart_product_path(@product), :method => :post %>
  </div>

  <%=simple_format @product.description %>

</div>


<% if @product.product_attributes.size > 0 %>


  <h2>Eigenschappen</h2>
  <table>
    <tr>
      <th width="50%">Naam</th>
      <th width="50%">Waarde</th>
    </tr>

    <% @product.product_attributes.each do |product_attribute| %>
      <tr class="<%=row_class %> ">
        <td><%=h product_attribute.attribute.name %>:</td>

        <% if product_attribute.attribute.filterable %>
          <td><%=link_to h(product_attribute.value), {
              :controller   => :search,
              :action       => :set_attribute_filter,
              :attribute_id => product_attribute.attribute.id,
              :filter       => product_attribute.value} %> </td>
          <% else %>
          <td><%=h product_attribute.value %> </td>
        <% end %>
      </tr>
    <% end %>

  </table>

<% end %>

<h2>In categorie&euml;n:</h2>
<ul>
  <% @product.categories.each do |category| %>
    <li><%= format_category_trace( category )  %></li>
  <% end  %>

  <% if @product.categories.size == 0 %>
    <li>Geen</li>
  <% end %>
</ul>

<% if @is_admin  %>
  <%= link_to 'Edit', edit_admin_product_path(@product) %>
<% end %>



<%  content_for :rightsidebar do %>
<h2>Koop ook</h2>
<%=  render :partial => 'sidebar', :locals => {:products => Statistics.find_recommended_products_for_product(@product, 5)} %>
<% end %>